package com.dingreading.cloud.admin.util.bean;

import com.dingreading.cloud.admin.entity.ExpressCompany;

public class ExpressUtil {

    /**
     * 新建快递公司
     */
    public static ExpressCompany newExpress(ExpressCompany data, String name, Integer enabled) {
        if (data.getId() != null && data.getId() > 0) {

        } else {
            data.setEnabled(1);
        }

        if (name != null)
            data.setName(name);
        if (enabled != null)
            data.setEnabled(enabled);
        return data;
    }

}
